import * as types from './mutation-type'

export default {
  /**
   * 进入下一题
   */
  [types.ADD_ITEMNUM](state) {
    state.itemNum++;
  },
  /**
   * 保存答案
   */
  [types.SAVE_ANSWER](state, payload) {
    state.answers.push(payload);
  },
  /*
	初始化信息，
	 */
  [types.INITIALIZE_DATA](state) {
    state.itemNum = 1;
    state.allTime = 0;
    state.answers = [];
  }
}
